<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../style.css" type="text/css" rel="stylesheet" />
    <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../prettify/prettify.js"></script>
    <title>QDCM: DICOM for Qt</title>
</head>
<body onload="prettyPrint()">
    <p><a href="../index.html"><< Back to the main page</a></p>
    <h2>Writing DICOM files</h2>

    <p class="text">
        DICOM dataset can be easily written to a file:
        <pre class="prettyprint lang-cpp linenums">
DcmDataset dataset;
// ...
DcmFile file("dicom.dcm");
file.write(dataset);
</pre>
        By default Implicit Little Endian transfer syntax (1.2.840.10008.1.2) is used
        when writing DICOM files. But any other syntax can be used as well:
        <pre class="prettyprint lang-cpp linenums">
DcmDataset dataset;
// ...
DcmFile file("dicom.dcm");
file.write(dataset, DcmTransferSyntax::ExplicitLittleEndian);
</pre>
        Pay attention that TransferSyntaxUID (0002, 0010) tag in a dataset object is
        modified according to the syntax used when writing a file.
    </p>
    

    <hr>
    <address>
        ©2012 by
        <a href="mailto:arthur.benilov@gmail.com">Arthur Benilov</a>
        <p class="hostedby">
            <a href="http://sourceforge.net/">
                Project Web Hosted by
                <br>
                <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=265589&type=13" alt="SourceForge.net">
            </a>
        </p>
    </address>
</body>
</html>